﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MonoSettlers
{
    public partial class MainWindow
    {
        private void SetupGUI()
        {
            // load roman config
            var romanCfg = RaceConfigLoader.Open(@".\Resources\RaceConfig\Roman.Buildings.xml");
            int iBuilding = 0;

            foreach (var building in romanCfg.Buildables)
            {
                IMAGES_Buildings.Images.Add(Renderer.LoadAmbientSnapshot(building.AnimationClass));
                LIST_Buildings.Items.Add("", iBuilding++).ToolTipText = building.AnimationClass;
            }

            var house = romanCfg.Buildables.ElementAt(10);

            Renderer.ShowBuildingGrid((pos) =>
            {
                if (BuildMgr.CanBuildHere(pos, house))
                    return 0;
                else
                    return - 1;
            });
        }
    }
}
